package com.zjj.day4.person;

/**
 * @author zhoujunjie
 * @desc TODO
 * @date 2025/4/22
 */
class Employee extends Person implements Add {
    protected String ID;
    protected double salary;
    protected int workYears;

    public Employee(String name, String address, String ID, double salary, int workYears) {
        super(name, address);
        this.ID = ID;
        this.salary = salary;
        this.workYears = workYears;
    }

    public Employee() {
    }

    public Employee(String ID, double wage, int workYears) {
        this.ID = ID;
        this.salary = wage;
        this.workYears = workYears;
    }

    @Override
    public String toString() {
        return "Employee{name='" + name + "', address='" + address + "', ID='" + ID + "', salary=" + salary + ", workYears=" + workYears + "}";
    }

    @Override
    public void raiseSalary() {
        this.salary *= 1.1;
        System.out.println(name + " 涨薪后工资为: " + salary);
    }

    /**
     * 获取
     * @return ID
     */
    public String getID() {
        return ID;
    }

    /**
     * 设置
     * @param ID
     */
    public void setID(String ID) {
        this.ID = ID;
    }

    /**
     * 获取
     * @return wage
     */
    public double getWage() {
        return salary;
    }

    /**
     * 设置
     * @param wage
     */
    public void setWage(double wage) {
        this.salary = wage;
    }

    /**
     * 获取
     * @return workYears
     */
    public int getWorkYears() {
        return workYears;
    }

    /**
     * 设置
     * @param workYears
     */
    public void setWorkYears(int workYears) {
        this.workYears = workYears;
    }
}